const express = require('express');
const router = express.Router();

const accountBookController = require('../controller/accountBookController.js');
// router.get('/', accountBookController.getNowMonthData);
router.post('/add', accountBookController.add);
router.post('/edit', accountBookController.edit);
router.get('/delete', accountBookController.delete);
router.get('/getAccountTotal', accountBookController.getAccountTotal);
router.get('/getNowMonthTotal', accountBookController.getNowMonthTotal);
router.get('/getPieReportFormData', accountBookController.getPieReportFormData);
router.get('/getAccountBookTotal', accountBookController.getAccountBookTotal);

const userController = require('../controller/userController.js');
router.post('/register', userController.register);
router.post('/login', userController.login);
router.post('/forget', userController.updatePwd);

const postingsController = require('../controller/postingsController.js');
router.get('/getAllPostings', postingsController.getAllPostings);
router.post('/addPosting', postingsController.addPosting);


module.exports = router;